package com.bRoom.dao;

import com.bRoom.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkUsername (String userName);

    int checkUpdateUsername (@Param("userName") String userName,@Param("userId") Integer userId);

    User login(@Param("userName") String userName, @Param("Md5Password") String Md5Password);

     String findQuestion( String userName);

     int checkAnswer(@Param("userName") String userName,@Param("question") String question,@Param("answer") String answer);

     int resertPassword(@Param("userName") String userName,@Param("Md5Password") String Md5Password);

     int checkPassword(@Param("Md5Password") String Md5Password,@Param("userId") Integer userId);

     int loginResertPAssword(@Param("Md5Password") String Md5Password,@Param("userId") Integer userId);
}